package cn.stazxr.component;

import javax.swing.*;

/**
 * Package: cn.stazxr.component
 *
 * @Author: stazxr
 * @Create: 2023/12/11
 * @Version: v1.0
 **/
public class JToggleButtonTest {
    public static void main(String[] args) {
        JFrame frame = new JFrame("我是标题");
        frame.setBounds(500,500,500,300);
        frame.setLayout(null);

        JToggleButton button = new JToggleButton("我是开关");
        button.setBounds(10,10,100,30);
        button.setSelected(true);
        frame.add(button);

        frame.setVisible(true);
    }
}
